/*
 * @Author: zxhuan
 * @Date: 2019-05-14 21:43:18
 * @blog: http//:www.zxhuan.com
 * @Last Modified time: 2019-05-14 21:43:18
 */

import {Ajax} from '@/Ajax'
import dataURL from './dataURL'
import {md5Encoder} from './Func'
import {dataDecoder, dataEncoder} from '@/providers/Func'
/**
 * 登陆
 * Phone
 * PassWord
 * @param {*} param0
 */
// 1--用户登录
export const LoginInfo = ({
    Phone,
    PassWord
}) => Ajax.Post(dataURL.LoginInfo, {
    Phone,
    PassWord: md5Encoder(PassWord)
})

// 2-忘记密码
export const ForgetPassword = ({
    Mobile,
    NewPassWord,
    SmsCode
}) => Ajax.Post(dataURL.ForgetPassword, {
    Mobile,
    NewPassWord: md5Encoder(NewPassWord),
    SmsCode
})

// 3-修改密码
export const EditPassWord = (params) => Ajax.Post(dataURL.EditPassword, params)

// 4-用户注册
export const userRegister = ({
    TrueName,
    Mobile,
    IDNO,
    PassWord,
    SmsCode,
    ProvinceID,
    CityID,
    DistrictID,
    GradeID,
    SubjectID,
    UserCompany
}) => Ajax.Post(dataURL.Register, {
    TrueName,
    Mobile,
    IDNO,
    Password: md5Encoder(PassWord),
    SmsCode,
    ProvinceID,
    CityID,
    DistrictID,
    GradeID,
    SubjectID,
    UserCompany
})

// 5-获取用户信息
export const AppUserInfo = (parmas) => Ajax.Post(dataURL.appInfo, parmas)

// 6-修改用户信息
export const EditUserInfo = (params) => Ajax.Post(dataURL.EditUserInfo, params)


// 8-获取短信验证码--注册
export const GetPhoneSmsCode = (params) => Ajax.Post(dataURL.GetPhoneSmsCode,params,2)

// 8-获取短信验证码--注册之外的
export const GetPhoneSmsCodeOther = (params) => Ajax.Post(dataURL.GetPhoneSmsCodeOther,params,2)
// 获取年级
export const getGrade = () => Ajax.Post(dataURL.getGrade)

// 获取学科
export const getSubject = () => Ajax.Post(dataURL.getSubject)

// 9-更改手机号
export const ChangeUserMobile = (parmas) => Ajax.Post(dataURL.ChangeUserMobile, parmas)

// 10-省市区
export const AppProvinceDataList = () => Ajax.Post(dataURL.AppProvinceDataList)

// 11-年级
export const AppGradeDataList = () => Ajax.Post(dataURL.AppGradeDataList)

// 12-学科
export const AppSubjectDataList = () => Ajax.Post(dataURL.AppSubjectDataList)

// 13-职称
export const AppPositionDataList = () => Ajax.Post(dataURL.AppPositionDataList)

// 14-首页项目列表
export const TrainingList = (parmas) => Ajax.Post(dataURL.TrainingList, parmas)

// 15-项目详情
export const TrainingDetail = (parmas) => Ajax.Post(dataURL.TrainingDetail, parmas)

// 16-课程详情
export const CourseDetail = (parmas) => Ajax.Post(dataURL.CourseDetail, parmas)

// 17-专家上下课操作
export const ExpertSetClass = (parmas) => Ajax.Post(dataURL.ExpertSetClass, parmas)

// 18-学员签到
export const StudentSign = (parmas) => Ajax.Post(dataURL.StudentSign, parmas)

// 19-我的项目列表-未完待续
export const MyTrainingList = (parmas) => Ajax.Post(dataURL.MyTrainingList, parmas)

// 20-我的项目报告
export const MyTrainingReportDetail = (parmas) => Ajax.Post(dataURL.TrainingReportDetail, parmas)

export const TExpertStatistic = (parmas) => Ajax.Post(dataURL.TExpertStatistic, parmas)
// 出勤率
export const PAdminStatistic = (parmas) => Ajax.Post(dataURL.PAdminStatistic, parmas)

// 22-学院报名参加项目
export const StudentjoinTraining = (parmas) => Ajax.Post(dataURL.StudentjoinTraining, parmas)

// 23-项目总结新增编辑
export const TrainingAddEditSummary = (parmas) => Ajax.Post(dataURL.TrainingAddEditSummary, parmas)

// 24-项目总评价
export const ProjectEvaluation = (parmas) => Ajax.Post(dataURL.ProjectEvaluation, parmas)
/**
 * 手册列表
 * @param {*} parmas
 */
export const QXTrainingManualList = (parmas) => Ajax.Post(dataURL.QXTrainingManualList, parmas)
/**
 * 手册详情
 * @param {*} parmas
 */
export const QXManualDetail = (parmas) => Ajax.Post(dataURL.QXManualDetail, parmas)
/**
 * 课程评论列表
 * @param {*} parmas
 */
export const CourseDiscussList = (parmas) => Ajax.Post(dataURL.CourseDiscussList, parmas)
/**
 *  评论点赞
 * @param {*} parmas
 */
export const CourseDiscussZan = (parmas) => Ajax.Post(dataURL.CourseDiscussZan, parmas)
/**
 * 发表评论
 * @param {*} parmas
 */
export const CourseDiscussAdd = (parmas) => Ajax.Post(dataURL.CourseDiscussAdd, parmas)
/**
 * 删除评论
 * @param {*} parmas
 */
export const CourseDiscussDelete = (parmas) => Ajax.Post(dataURL.CourseDiscussDelete, parmas)
/**
 * 评论回复列表
 * @param {*} parmas
 */
export const CourseDiscussInfoList = (parmas) => Ajax.Post(dataURL.CourseDiscussInfoList, parmas)

/**
 * 课程或者项目评价列表
 * @param {*} parmas
 */
export const TrainingRuleList = (parmas) => Ajax.Post(dataURL.TrainingRuleList, parmas)

/**
 * 项目或者课程总评价新增
 * @param {*} parmas
 */
export const EvaluationAdd = (parmas) => Ajax.Post(dataURL.EvaluationAdd, parmas)

/**
 * 课程或者项目评价结果
 * @param {*} parmas
 */
export const EvalationDetail = (parmas) => Ajax.Post(dataURL.EvalationDetail, parmas)
// 项目总结详情
export const TrainingSummaryDetail = (parmas) => Ajax.Post(dataURL.ProjectSummaryDetail, parmas)

// 领导和专家项目总评和报告项目详情页进入课程评价
export const GetTrainingOtherEvaluationInfo = (parmas) => Ajax.Post(dataURL.GetTrainingOtherEvaluationInfo, parmas)
